import json


def main(args):
    params = args["params"]

    # 解构参数
    start_texts = params['start_texts']
    start_audio_list = params['start_audio_list']
    start_duration_list = params['start_duration_list']
    audio_list1 = params['audio_list1']
    audio_list2 = params['audio_list2']
    audio_list3 = params['audio_list3']
    duration_list1 = params['duration_list1']
    duration_list2 = params['duration_list2']
    duration_list3 = params['duration_list3']
    text_list1 = params['text_list1']
    text_list2 = params['text_list2']
    text_list3 = params['text_list3']
    bg_image = params['bg_image']
    keywords = params['keywords']

    start = 0
    end = 0

    # 初始化数据结构
    # 开场镜头
    start_text_infos_1 = []
    start_text_infos_2 = []
    start_text_infos_3 = []
    start_audio_infos = []
    start_audio_effect_1 = []
    start_audio_effect_2 = []
    # 主体内容
    text_infos_1 = []
    text_infos_2 = []
    audio_infos = []
    host_images = []
    book_images = []
    bg_image_infos = []

    # 开场镜头数据组装
    for i, ele in enumerate(start_audio_list):
        audio_url = ele['output']
        duration = start_duration_list[i]['output']
        text = start_texts[i]
        end = start + float(duration) * 1000000

        # 音频信息
        start_audio_infos.append({
            'audio_url': audio_url,
            'start': start,
            'end': end,
            'volume': 4
        })

        # 音效处理
        if i == 0:
            start_audio_effect_1.append({
                'audio_url': "https://p6-bot-sign.byteimg.com/tos-cn-i-v4nquku3lp/0562121f72f943f2802c7e8dc49e0e7b.MP3~tplv-v4nquku3lp-image.image?rk3s=68e6b6b5&x-expires=1749305401&x-signature=ZiBfMBfiHBWUnk6iqQPFe%2FFdfDM%3D",
                'volume': 2,
                'start': start,
                'end': 548571
            })
        elif i == 1:
            start_audio_effect_2.append({
                'audio_url': "https://p9-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/2ae7ccd877ea4c79b4fcbcfe38170b54.MP3~tplv-mdko3gqilj-image.image?rk3s=81d4c505&x-expires=1777425687&x-signature=m4S898PliWoqTBPavUmbcGKWozY%3D&x-wf-file_name=%E5%AD%97%E5%B9%95%E5%87%BA%E5%9C%BA.MP3",
                'volume': 2,
                'start': start,
                'end': start + 862040
            })

        # 字幕处理
        text_info = {
            'text': text,
            'start': start,
            'end': end,
            'in_animation_duration': 500000
        }
        if i == 0:
            text_info['in_animation'] = '逐字旋入'
            start_text_infos_1.append(text_info)
        elif i == 1:
            text_info['in_animation'] = '放大'
            start_text_infos_2.append(text_info)
        elif i == 2:
            text_info['in_animation'] = '向上滑动'
            start_text_infos_3.append(text_info)

        start = end

    # 主体内容数据组装
    audio_list = audio_list1 + audio_list2 + audio_list3
    duration_list = duration_list1 + duration_list2 + duration_list3
    text_list = text_list1 + text_list2 + text_list3

    current_role_name = ''
    # 处理主体内容
    for i in range(len(audio_list)):
        audio_url = audio_list[i]
        duration = duration_list[i] * 1000000
        text = text_list[i]['line']
        text = '\n'.join([text[j:j + 10] for j in range(0, len(text), 10)])  # 每 10 字换行
        role_name = text_list[i]['role_name']
        end = start + duration

        # 音频信息
        audio_infos.append({
            'audio_url': audio_url,
            'start': start,
            'end': end,
            'volume': 4
        })

        # 关键词处理
        keywordArr = [key for key in keywords if key in text]
        text_info = {
            'text': text,
            'start': start,
            'end': end,
            'in_animation': '羽化向右擦开',
            'in_animation_duration': 500000,
            'keyword': '|'.join(keywordArr),
            'keyword_color': '#fe8a80',
            'keyword_font_size': 10,
            'font_size': 10
        }
        if role_name == '主持人':
            text_infos_1.append(text_info)
        else:
            text_infos_2.append(text_info)

        # 图片处理
        host_image_info = {
            'image_url': 'https://p9-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/7153ce955e1b4d51ab2e3972846fb13e.png~tplv-mdko3gqilj-image.image?rk3s=81d4c505&x-expires=1777338929&x-signature=LLDTeL38s5rfHt7%2BG1%2FvGFrwa%2FQ%3D&x-wf-file_name=CodeL.png',
            'width': 300,
            'height': 300,
            'in_animation': '轻微放大',
            'in_animation_duration': 500000
        }
        book_image_info = {
            'image_url': 'https://s.coze.cn/t/MRdXPFzGLOw/',
            'width': 300,
            'height': 300,
            'in_animation': '轻微放大',
            'in_animation_duration': 500000
        }

        if current_role_name != role_name:
            if role_name == '主持人':
                host_image_info['start'] = start
                host_images.append(host_image_info)
                if book_images:
                    book_images[-1]['end'] = start
            else:
                book_image_info['start'] = start
                book_images.append(book_image_info)
                if host_images:
                    host_images[-1]['end'] = start
            current_role_name = role_name

        if i == len(audio_list) - 1:
            if role_name == '主持人':
                host_images[-1]['end'] = end
            else:
                book_images[-1]['end'] = end

        start = end

    # 背景处理
    bg_image_infos.append({
        'image_url': bg_image,
        'width': 1920,
        'height': 1080,
        'start': 0,
        'end': end
    })

    # 构建返回结果
    return {
        'start_text_infos_1': json.dumps(start_text_infos_1),
        'start_text_infos_2': json.dumps(start_text_infos_2),
        'start_text_infos_3': json.dumps(start_text_infos_3),
        'start_audio_infos': json.dumps(start_audio_infos),
        'start_audio_effect_1': json.dumps(start_audio_effect_1),
        'start_audio_effect_2': json.dumps(start_audio_effect_2),
        'text_infos_1': json.dumps(text_infos_1),
        'text_infos_2': json.dumps(text_infos_2),
        'audio_infos': json.dumps(audio_infos),
        'host_images': json.dumps(host_images),
        'book_images': json.dumps(book_images),
        'bg_image_infos': json.dumps(bg_image_infos)
    }


if __name__ == '__main__':
    dic = {
        "audio_list1": [
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_b9e231e9-4abc-4f67-a580-6f6f67a9d9bd.mp3?lk3s=da27ec82&x-expires=1752515982&x-signature=P9wEE35Z44sxWHUbC%2BImEqMdQpw%3D",
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_002452f9-e4ba-44c8-b368-38964aa31edf.mp3?lk3s=da27ec82&x-expires=1752515983&x-signature=tsAu9MGh%2BMsOlBzoE%2B2zpWnnvOQ%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_e5e0ed0b-fda4-4021-8590-80ce953d0008.mp3?lk3s=da27ec82&x-expires=1752515984&x-signature=jNvduWN7CrsDZ7wPhnk4o8Frda0%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_dc5c09cb-3756-4206-9720-5058141eca42.mp3?lk3s=da27ec82&x-expires=1752515985&x-signature=EuYJYb8fCkU3Pu4NMsdeeNjcBtA%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_b17d17ca-50e0-417d-b34a-e5da1fe51b1e.mp3?lk3s=da27ec82&x-expires=1752515986&x-signature=rYLHnsSJrBXx%2BoMLpEo%2FZqLVckw%3D",
            "https://lf3-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_5b98b086-a62e-4c7c-8584-c19ad336622b.mp3?lk3s=da27ec82&x-expires=1752515987&x-signature=r%2BNn6gmk19KkO2wAwqYP7E8GM7I%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_0de935bb-a001-41ff-84fb-ea2776074218.mp3?lk3s=da27ec82&x-expires=1752515988&x-signature=R7mevg1%2BBySlWZ%2BwbVJ1LgxYx%2B0%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_f3e26392-f5d6-47a1-b15b-3f95c4ed1473.mp3?lk3s=da27ec82&x-expires=1752515990&x-signature=vxSK6Q3OfFNfxt6dfYA04GbUE0o%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_77edd98c-bef8-400e-9c0e-23801e78cb5a.mp3?lk3s=da27ec82&x-expires=1752515991&x-signature=WSok9aa4Oo47Uqvi%2FkysClnAaec%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_14b1312d-eb70-476e-8f5b-938f0e6b0150.mp3?lk3s=da27ec82&x-expires=1752515992&x-signature=jl7Bernn8xDOMizTzczcSerSdUo%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_16652c8a-725e-4742-8e86-37f38b960f97.mp3?lk3s=da27ec82&x-expires=1752515993&x-signature=EI%2BIUVWv%2FLjBbNCFyjblAumW%2BBk%3D",
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_1b5adbd3-cf40-4e18-8414-18be53453a98.mp3?lk3s=da27ec82&x-expires=1752515994&x-signature=tNLWVacGQRNAw9rClRaQjizDGlU%3D",
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_9021a33b-fddb-4331-bf18-28caa30d7d61.mp3?lk3s=da27ec82&x-expires=1752515996&x-signature=I9%2FmatX28mGQsqVA4RbZ4jbu86M%3D",
            "https://lf3-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_de0272c2-b976-444f-9056-d65c623e54a0.mp3?lk3s=da27ec82&x-expires=1752515997&x-signature=3hQRC3Kna9OweYoWFWkhAFVoMfo%3D",
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_8ed31c6f-68cc-4650-a469-fe383b453a07.mp3?lk3s=da27ec82&x-expires=1752515998&x-signature=PJvsjcdS1D46W57RIrScd%2BR91sk%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_d84e5bb7-f1d1-4e32-83dc-a88cdae7ba21.mp3?lk3s=da27ec82&x-expires=1752515999&x-signature=qprHUiJDI8D7YQTIagelEYCgW14%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_3d51034c-575b-498e-9a41-15c4ee66f7ea.mp3?lk3s=da27ec82&x-expires=1752516000&x-signature=IXOOW8zC%2FqHe6J4SHdYZ6ZaxjdA%3D",
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_8c3563e1-d5c2-4aeb-a2a7-54b185b07ce9.mp3?lk3s=da27ec82&x-expires=1752516001&x-signature=qiDCojayuPm0lciKp64qxQsSl68%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_b4a16f22-3c7a-402e-aa86-228cc7f456da.mp3?lk3s=da27ec82&x-expires=1752516002&x-signature=e26%2FqV0WamlzDEXmbzbB7wLioa8%3D",
            "https://lf3-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_2298d994-5e5e-4d75-b99a-60bda15d49f4.mp3?lk3s=da27ec82&x-expires=1752516004&x-signature=9M%2FxFwa6wbax89T5n8xjqReprYA%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_4768a3e3-a087-442d-96aa-4d83e5ae19f2.mp3?lk3s=da27ec82&x-expires=1752516005&x-signature=1eVmt2cVS4S5vyyO%2F4S0zMVW6Hc%3D"
        ],
        "audio_list2": [
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_59ce2b68-f805-4c5d-b012-dfdb8f2abe12.mp3?lk3s=da27ec82&x-expires=1752515982&x-signature=ZXpZL1ga76l7jZuA29LLr3Skvhk%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_13a336a9-bcdb-4518-b2e7-30b5f6ea8a12.mp3?lk3s=da27ec82&x-expires=1752515984&x-signature=DSAm5HLJXvDTUU9yJkbr0A9KFa4%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_7c4cc935-cc6d-48ae-b7d4-66028dd9d916.mp3?lk3s=da27ec82&x-expires=1752515985&x-signature=6FCajYxD0JuVonQLsBCPyUESI%2FU%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_fc29d6ab-b3a3-4858-8a90-b48b3e2fb300.mp3?lk3s=da27ec82&x-expires=1752515987&x-signature=q%2F5SvIxyO4McdTn3c4CZ0domAo0%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_460c74f9-93c1-4b8e-8a5e-03eb78d9c271.mp3?lk3s=da27ec82&x-expires=1752515987&x-signature=ZcVb%2F0QZi6mZXLbiUq7SUsvtHaw%3D",
            "https://lf3-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_33926da0-c7f1-48e8-976b-a031293f257f.mp3?lk3s=da27ec82&x-expires=1752515988&x-signature=AqXOIwU0V7Zqsfc7QhP0VPdLM00%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_eaf69bc3-09c5-4f02-bc2f-ce903b1bde39.mp3?lk3s=da27ec82&x-expires=1752515989&x-signature=%2F2d1Aum9jJGfvwoe9GHEkimjwt4%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_3fef1ea6-9a6d-4475-8422-d51c5f12a271.mp3?lk3s=da27ec82&x-expires=1752515991&x-signature=anOfgqU7hfK%2F%2B9Tje4R3K16yNQ4%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_a3b1f7fe-b39d-4876-96f3-45a4d776b7f4.mp3?lk3s=da27ec82&x-expires=1752515992&x-signature=tPR0YjjqNEVcSA68zyPSxFHOTbM%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_2314c02a-0802-4217-aa0d-bce03005b939.mp3?lk3s=da27ec82&x-expires=1752515993&x-signature=1ejdhH1fbrCO7NIp0U28YILm7CA%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_b99f2f06-e204-43e5-b8ce-80d1d9fb9316.mp3?lk3s=da27ec82&x-expires=1752515994&x-signature=BL15OiDEZeVuOandiS3FigbJWs8%3D",
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_9d7d7b9b-2fb0-4384-8a13-dab4f9742d60.mp3?lk3s=da27ec82&x-expires=1752515995&x-signature=lDkuiH%2FzSnG5Q1nU%2FGy78ujd1Ns%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_dbbd1630-226c-4f2d-be62-df89fcd9be75.mp3?lk3s=da27ec82&x-expires=1752515996&x-signature=q%2FFomYfOKg2tyv6nfebENkBNO8o%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_55868afd-810f-4c0e-9d3d-5a8bcee6f8a5.mp3?lk3s=da27ec82&x-expires=1752515997&x-signature=FgxsEWJGyH204gdZ9y0PoPBitoY%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_f99b941a-adda-4ecd-802c-49c2ebdec3b4.mp3?lk3s=da27ec82&x-expires=1752515999&x-signature=KljjLUveeo6QopTYxJHSEC1VDPI%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_c8364e35-8752-4104-ae5d-4a4a7ce3046c.mp3?lk3s=da27ec82&x-expires=1752516000&x-signature=k2VvcPMRRY6F4xfcil3rW8C54ZQ%3D",
            "https://lf3-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_c7285f8e-2ffb-43e2-9bbb-446cc5db61de.mp3?lk3s=da27ec82&x-expires=1752516001&x-signature=VNB8RlDexOqVMeYcT65TeKifodA%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_91faacb9-52d0-4195-97e5-b43cfeaf1705.mp3?lk3s=da27ec82&x-expires=1752516002&x-signature=KY4H4Y4wdRQHSt8pgVD1Ubd2C8k%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_78254d01-674c-49a6-bf41-33c806710359.mp3?lk3s=da27ec82&x-expires=1752516004&x-signature=Tee9kPxx%2FkO%2Bf3OG38sR6tsOLcc%3D",
            "https://lf3-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_6e9043b3-a4a9-4694-9a5f-a4321019c6c7.mp3?lk3s=da27ec82&x-expires=1752516005&x-signature=TomWXTdIvPlsxjQ9stuTM1Gn1nc%3D",
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_aa4aa5b0-f1e6-4c40-b242-0499ec9bbc6c.mp3?lk3s=da27ec82&x-expires=1752516006&x-signature=cUD9P5pUXyL17Yg%2BVaQW9Goga58%3D"
        ],
        "audio_list3": [
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_01b091fb-96c5-40a5-bff1-68a8b0a8e502.mp3?lk3s=da27ec82&x-expires=1752515982&x-signature=vCnBhEsryMNwZBVOddBKe8UTdSo%3D",
            "https://lf3-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_f324f5ce-c446-4a61-9c3b-d13381c37df5.mp3?lk3s=da27ec82&x-expires=1752515983&x-signature=NRexKLQ7PTQwKI6InuimKPn8K1s%3D",
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_f0bf502b-15ca-4a1e-8459-3727167b7b60.mp3?lk3s=da27ec82&x-expires=1752515984&x-signature=FIWoc%2FMAS2ZSvROF%2BV8Y%2BtRF%2BS4%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_256e4a22-696d-472d-9d47-4e3105f66c91.mp3?lk3s=da27ec82&x-expires=1752515985&x-signature=ONCAm2INfRBdS6JIWKLWIQ883ck%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_ec687527-b991-4fd4-9029-d39bb065e0e8.mp3?lk3s=da27ec82&x-expires=1752515986&x-signature=lrHQBkhg79ILsr8VcETLJA3xIoM%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_32ad11f2-7f1c-4b04-94bd-efb9b9f894eb.mp3?lk3s=da27ec82&x-expires=1752515988&x-signature=wfz9ho1KA%2B5%2FagEgJ77WG9dQ1FU%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_add807f9-9527-4635-b1e1-f650b4cfbe84.mp3?lk3s=da27ec82&x-expires=1752515989&x-signature=DqoAPrziI36ywYU3A0uYQvlPUtk%3D",
            "https://lf3-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_2af19a36-20da-4bf2-a1fc-d29a74fbfc67.mp3?lk3s=da27ec82&x-expires=1752515990&x-signature=fu26ABNTg9L9eDCWyJaBimtrw6o%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_c8b1da5f-a222-429c-aefd-44feb626ff55.mp3?lk3s=da27ec82&x-expires=1752515991&x-signature=3MLPlYB5rQ5y3Pq1haOtFyh57cw%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_7663da36-df59-4ea1-b4fb-feacc7158763.mp3?lk3s=da27ec82&x-expires=1752515992&x-signature=1jSHDj36KxjcwOnOaHKhPHBZl%2BU%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_185d2d7a-e067-40bf-a5ff-82c15d8befd0.mp3?lk3s=da27ec82&x-expires=1752515993&x-signature=iK7rRORtytMNILKMZe41m6OI1Lc%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_0088a064-a3cd-42a7-aa2e-e772af1cb3c9.mp3?lk3s=da27ec82&x-expires=1752515995&x-signature=AWuc1hV4ydsnVioX621pU28rJ6w%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_c5d85b79-d221-4a28-8603-d6259e6f0799.mp3?lk3s=da27ec82&x-expires=1752515996&x-signature=Z6JOvJuDzNPU9%2B%2Fa5W71clsbKfU%3D",
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_1be70772-6c27-4054-8e85-08b7e0217d5e.mp3?lk3s=da27ec82&x-expires=1752515997&x-signature=V1mKgLkduuYAq2D3DmoZ8%2BlTQP4%3D",
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_e9973221-a9e0-4dfb-a092-e79ca0bbc2a4.mp3?lk3s=da27ec82&x-expires=1752515998&x-signature=WSRuprxTcarCd3HdSdjIbEMLE6I%3D",
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_ee55e8ed-2898-43cc-ac0b-35906dac504d.mp3?lk3s=da27ec82&x-expires=1752515999&x-signature=o3hhB1SlEAil37MFES2GnVHYsww%3D",
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_b3fd0079-06c4-444f-9b98-2ecd550eac63.mp3?lk3s=da27ec82&x-expires=1752516000&x-signature=ZlZE7dLzgQX92RSHB5yCMfQv3PY%3D",
            "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_1c81b7db-19ca-486b-99f4-627411c1ebeb.mp3?lk3s=da27ec82&x-expires=1752516001&x-signature=GhaV%2BGD%2BRokkNYmtABGEmAn6iVU%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_3f8a00ef-6bac-4be9-8abf-696f4da4c00c.mp3?lk3s=da27ec82&x-expires=1752516002&x-signature=Hw1TeXlS6Ys%2Fj%2BBwj%2Fyd90b3jjg%3D",
            "https://lf3-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_98caee39-579b-4de6-84ab-9d9270efa129.mp3?lk3s=da27ec82&x-expires=1752516003&x-signature=oe%2F6ggjsruOIadeeCVLw8ObN%2FBU%3D",
            "https://lf3-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426725529589645339_dcfb158f-50ea-4a27-a70c-75eaeebf8915.mp3?lk3s=da27ec82&x-expires=1752516004&x-signature=zmgXp4Z0U0I9HcvF545auGbIPU8%3D",
            "https://lf9-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_c0880316-291e-4bb7-a303-9a3fd5baa535.mp3?lk3s=da27ec82&x-expires=1752516005&x-signature=YluHpG8qyvYN%2FeM1RuNWn5h5Jgc%3D",
            "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733144585_75192294-c070-4868-8e5f-f337514c561c.mp3?lk3s=da27ec82&x-expires=1752516006&x-signature=IQ9Cwa7DJt2WipYA6QY2TLetMuE%3D"
        ],
        "bg_image": "https://p3-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/a4f3393f8c64478f9551630bd0e80d66.png~tplv-mdko3gqilj-image.png?rk3s=c8fe7ad5&x-expires=1783360785&x-signature=rZGECW48Airf2pG0ZKF9NSOd%2Bho%3D&x-wf-file_name=%E6%9C%AA%E7%9F%A5%E7%B1%BB%E5%9E%8B",
        "duration_list1": [
            1.248,
            0.816,
            1.152,
            1.608,
            2.856,
            0.864,
            2.52,
            1.608,
            2.088,
            1.608,
            1.512,
            1.536,
            2.856,
            3.024,
            3.048,
            1.056,
            1.632,
            1.656,
            2.736,
            1.8,
            1.752
        ],
        "duration_list2": [
            2.016,
            3.048,
            3.408,
            1.704,
            0.72,
            1.704,
            1.704,
            2.688,
            2.544,
            1.896,
            1.752,
            1.248,
            1.464,
            1.944,
            1.944,
            1.848,
            2.328,
            1.992,
            2.592,
            1.704,
            1.512
        ],
        "duration_list3": [
            1.56,
            1.176,
            1.464,
            0.696,
            2.64,
            1.968,
            2.688,
            1.776,
            4.104,
            1.728,
            1.512,
            1.776,
            1.08,
            2.784,
            2.28,
            1.368,
            1.344,
            1.512,
            1.44,
            3.312,
            1.224,
            1.344,
            2.352
        ],
        "keywords": [
            "剑来",
            "江湖",
            "陈平安",
            "修行",
            "道理",
            "人心",
            "小人物",
            "修行体系",
            "女性角色",
            "好人"
        ],
        "start_audio_list": [
            {
                "output": "https://lf26-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733177353_47124df3-5010-4209-b7b1-d2980ca6010f.mp3?lk3s=da27ec82&x-expires=1752515982&x-signature=R%2BRot%2BtnMaT6aBFuhrAAjAhZ9iU%3D"
            },
            {
                "output": "https://lf6-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733177353_db712c2c-c256-4b31-b85a-eec508b3150c.mp3?lk3s=da27ec82&x-expires=1752515982&x-signature=Y7qn1iRSBFOTxpURMf3IZJybsIA%3D"
            },
            {
                "output": "https://lf3-appstore-sign.oceancloudapi.com/ocean-cloud-tos/VolcanoUserVoice/speech_7426720361733177353_482e7525-984a-4616-a25c-f92604f36205.mp3?lk3s=da27ec82&x-expires=1752515982&x-signature=3e59XGh0QnhzSvhmvm0PQ2Yb1T0%3D"
            }
        ],
        "start_duration_list": [
            {
                "output": "1.512"
            },
            {
                "output": "1.032"
            },
            {
                "output": "0.744"
            }
        ],
        "start_texts": [
            "假如书籍会说话",
            "今日对话",
            "剑来"
        ],
        "text_list1": [
            {
                "line": "《剑来》老师",
                "role_name": "主持人"
            },
            {
                "line": "您好",
                "role_name": "主持人"
            },
            {
                "line": "主持人好",
                "role_name": "《剑来》"
            },
            {
                "line": "今天想聊点什么",
                "role_name": "《剑来》"
            },
            {
                "line": "读者常说您是'江湖百科全书'",
                "role_name": "主持人"
            },
            {
                "line": "为啥",
                "role_name": "主持人"
            },
            {
                "line": "江湖不只是打打杀杀",
                "role_name": "《剑来》"
            },
            {
                "line": "是茶米油盐",
                "role_name": "《剑来》"
            },
            {
                "line": "是人情冷暖",
                "role_name": "《剑来》"
            },
            {
                "line": "您书里的陈平安",
                "role_name": "主持人"
            },
            {
                "line": "和别的主角不一样",
                "role_name": "主持人"
            },
            {
                "line": "他没奇遇开挂",
                "role_name": "《剑来》"
            },
            {
                "line": "是泥瓶巷走出的少年",
                "role_name": "《剑来》"
            },
            {
                "line": "是搬砖还债的小木匠",
                "role_name": "《剑来》"
            },
            {
                "line": "是一步一叩首的修行者",
                "role_name": "《剑来》"
            },
            {
                "line": "啊",
                "role_name": "主持人"
            },
            {
                "line": "这也太真实了",
                "role_name": "主持人"
            },
            {
                "line": "真实才动人",
                "role_name": "《剑来》"
            },
            {
                "line": "就像我们谁没在生活里磕磕绊绊",
                "role_name": "《剑来》"
            },
            {
                "line": "您总说'道理'",
                "role_name": "主持人"
            },
            {
                "line": "和说教有啥区别",
                "role_name": "主持人"
            }
        ],
        "text_list2": [
            {
                "line": "道理不是板着脸讲",
                "role_name": "《剑来》"
            },
            {
                "line": "是陈平安被冤枉时仍守善",
                "role_name": "《剑来》"
            },
            {
                "line": "是老秀才教孩子先做人再读书",
                "role_name": "《剑来》"
            },
            {
                "line": "原来道理在细节里",
                "role_name": "主持人"
            },
            {
                "line": "对",
                "role_name": "《剑来》"
            },
            {
                "line": "就像我们劝朋友",
                "role_name": "《剑来》"
            },
            {
                "line": "哪是背大道理",
                "role_name": "《剑来》"
            },
            {
                "line": "是陪他喝酒时说'别硬扛'",
                "role_name": "《剑来》"
            },
            {
                "line": "书里小人物为啥让人难忘",
                "role_name": "主持人"
            },
            {
                "line": "卖糖葫芦的老周",
                "role_name": "《剑来》"
            },
            {
                "line": "开客栈的姚老头",
                "role_name": "《剑来》"
            },
            {
                "line": "他们有缺点",
                "role_name": "《剑来》"
            },
            {
                "line": "却活得认真",
                "role_name": "《剑来》"
            },
            {
                "line": "像极了我们身边的街坊",
                "role_name": "主持人"
            },
            {
                "line": "江湖不在高山顶",
                "role_name": "《剑来》"
            },
            {
                "line": "在人间烟火里",
                "role_name": "《剑来》"
            },
            {
                "line": "您的修行体系有啥特别",
                "role_name": "主持人"
            },
            {
                "line": "境界分十四层",
                "role_name": "《剑来》"
            },
            {
                "line": "却写透'人心即境界'",
                "role_name": "《剑来》"
            },
            {
                "line": "修拳先修心",
                "role_name": "《剑来》"
            },
            {
                "line": "练剑先练胆",
                "role_name": "《剑来》"
            }
        ],
        "text_list3": [
            {
                "line": "这和我们工作一样",
                "role_name": "主持人"
            },
            {
                "line": "能力重要",
                "role_name": "主持人"
            },
            {
                "line": "心态更重要",
                "role_name": "主持人"
            },
            {
                "line": "对",
                "role_name": "《剑来》"
            },
            {
                "line": "就像陈平安说'我有一碗酒",
                "role_name": "《剑来》"
            },
            {
                "line": "足以慰风尘'",
                "role_name": "《剑来》"
            },
            {
                "line": "书里女性角色为啥这么鲜活",
                "role_name": "主持人"
            },
            {
                "line": "宁姚不只有剑气",
                "role_name": "《剑来》"
            },
            {
                "line": "有少女的害羞；裴钱不只是野丫头",
                "role_name": "《剑来》"
            },
            {
                "line": "有对家的渴望",
                "role_name": "《剑来》"
            },
            {
                "line": "她们不是工具人",
                "role_name": "主持人"
            },
            {
                "line": "是有血有肉的人",
                "role_name": "主持人"
            },
            {
                "line": "好故事里",
                "role_name": "《剑来》"
            },
            {
                "line": "每个角色都该有自己的月光",
                "role_name": "《剑来》"
            },
            {
                "line": "您想通过书告诉读者什么",
                "role_name": "主持人"
            },
            {
                "line": "江湖很远",
                "role_name": "《剑来》"
            },
            {
                "line": "人心很近",
                "role_name": "《剑来》"
            },
            {
                "line": "哪怕世道难",
                "role_name": "《剑来》"
            },
            {
                "line": "也要做个'好人'",
                "role_name": "《剑来》"
            },
            {
                "line": "这大概就是书粉说的'看《剑来》",
                "role_name": "主持人"
            },
            {
                "line": "学做人'吧",
                "role_name": "主持人"
            },
            {
                "line": "希望每个人",
                "role_name": "《剑来》"
            },
            {
                "line": "都能在书里找到自己的'道理'",
                "role_name": "《剑来》"
            }
        ]
    }
    dic["params"] = dic
    print(main(dic))